import NavCustomBar from '@/pages/components/navCustomBar'
import Utils from '@/utils/index'
import './index.scss'

interface HeaderProps{
    title:string,
    isBlod?:boolean,
    isLeft?:boolean,
    needHome?:boolean,
    goback?:any,
    className?:any,
}

function App(props:HeaderProps) {

    const {
        title = '部门通知',
        isBlod = true,
        isLeft=false,
        needHome=true,
        goback='',
        className=''
    } = props

    if(Utils.getSystemInfo()==='weapp'){
        return (
            <></>
        )
    }

    return (
        <NavCustomBar
          mainTitle={title}
          mainTitleBold={isBlod}
          isTitlePositionLeft={isLeft}
          needMainIcon={needHome}
          onClick={typeof goback==='function'&&goback}
          className={className}
        />
    )
}
export default App